421098b69pUiIJrqu_w0JMUnZ2uc2A xen/arch/ia64/smp.c
421098b6_ToSGrf6Pk1Uwg5aMAIBxg xen/arch/ia64/smpboot.c
421098b6AUdbxR3wyn1ATcmNuTao_Q xen/arch/ia64/tools/README.xenia64
+42376c6dfyY0eq8MS2dK3BW2rFuEGg xen/arch/ia64/tools/README.xenia64linux
421098b6rQ2BQ103qu1n1HNofbS2Og xen/arch/ia64/tools/mkbuildtree
41a26ebc--sjlYZQxmIxyCx3jw70qA xen/arch/ia64/vcpu.c
421098b6M2WhsJ_ZMzFamAQcdc5gzw xen/arch/ia64/vhpt.c
regs->pr = 0;
sw->pr = 0;
regs->ar_pfs = 0;
+ sw->caller_unat = 0;
sw->ar_pfs = 0;
sw->ar_bspstore = new_rbs;
//regs->r13 = (unsigned long) ed;
struct exec_domain *ed = current;
// FIXME: Will this work properly if doing an RFI???
if (!is_idle_task(d) && user_mode(regs)) {
- vcpu_poke_timer(ed);
+ //vcpu_poke_timer(ed);
if (vcpu_deliverable_interrupts(ed)) {
unsigned long isr = regs->cr_ipsr & IA64_PSR_RI;
- foodpi();
+ if (vcpu_timer_pending_early(ed))
+printf("*#*#*#* about to deliver early timer to domain %d!!!\n",ed->domain->id);
reflect_interruption(0,isr,0,regs,IA64_EXTINT_VECTOR);
}
}
--- /dev/null
+INSTRUCTIONS FOR BUILDING XENLINUX/IA64
+
+1) In linux-2.6.9: (also tested with 2.6.10, 2.6.11.2)
+ cp arch/ia64/configs/zx1_defconfig .config
+2) vi .config
+ unset CONFIG_IA32_SUPPORT
+ unset CONFIG_IDE [for now, need to fix later]
+ unset CONFIG_VIRTUAL_MEM_MAP [for now, need to fix later]
+ set CONFIG_DISABLE_VHPT
+3) if running on ski, it is useful to make the following change:
+ a) at the beginning of drivers/acpi/motherboard.c:acpi_reserve_resources()
+ add the line:
+ if (!acpi_gbl_FADT) return;
+4) Build linux.
+ a) yes "" | make oldconfig
+ b) check the resulting .config to ensure there are no modules used (because
+ Xen/ia64 doesn't support them yet). Change '=m' to '=n' and remake
+ c) yes "" | make oldconfig
+ d) make
+5) Linux must be "privified" to run on Xen/ia64. This process converts all
+ privilege-sensitive instructions into privileged instructions.
+ Usage: privify infile outfile
+ Privify is very dumb... it will not overwrite outfile. It also prints
+ out a bunch of useless info that can be safely ignored (except for "panic").
+ The privify program can be obtained from:
+ ftp://ftp.hpl.hp.com/pub/xen-ia64/privify
+6) debug fixes:
+ a) periodically xenlinux/ia64 goes into a fit of printing
+ "Oops: timer tick before it is due..." This can be changed
+ in arch/ia64/kernel/time.c to either ignore it or print something
+ shorter
+ b) The hp simulator (ski) console drivers can be turned on to allow
+ output of early boot information from xenlinux. This results
+ in some duplication of later output (which can be ignored).
+ i) in linux/arch/ia64/Makefile, force the sim drivers by changing
+ drivers-$(CONFIG_IA64_HP_SIM) += arch/ia64/hp/sim to
+ drivers-y += arch/ia64/hp/sim
+ ii) in linux/arch/ia64/hp/sim/Makefile, force the sim drivers
+ by changing obj-$(CONFIG_HP_SIMSERIAL) to obj-y and
+ obj-$(CONFIG_HP_SIM_SERIAL_CONSOLE) to obj-y
+ iii) in arch/ia64/kernel/setup.c:early_console_setup(), replace
+ the contents of the routine with:
+ extern struct console hpsim_cons;
+ register_console(&hpsim_cons);
+ return 0;
+ (It may be necessary also to un-inline the routine, not sure.)
+ c) It can be useful to modify linux/init/main.c to add a printf before
+ or after a lot of the init calls
+6) NOTE: mca currently has a problem with binary translation,
+ must run with "nomca" as a kernel argument
vcpu_check_pending_interrupts(vcpu) != SPURIOUS_VECTOR);
}
+UINT64 vcpu_deliverable_timer(VCPU *vcpu)
+{
+ return (vcpu_get_psr_i(vcpu) &&
+ vcpu_check_pending_interrupts(vcpu) == PSCB(vcpu,itv));
+}
+
IA64FAULT vcpu_get_lid(VCPU *vcpu, UINT64 *pval)
{
extern unsigned long privop_trace;
UINT64 itv = PSCB(vcpu,itv) & 0xff;
if (vcpu_timer_disabled(vcpu)) return;
+#if 1
+ // attempt to flag "timer tick before its due" source
+ {
+ UINT64 itm = PSCB(vcpu,domain_itm);
+ UINT64 now = ia64_get_itc();
+ if (now < itm) printf("******* vcpu_pend_timer: pending before due!\n");
+ }
+#endif
vcpu_pend_interrupt(vcpu, itv);
}
+// returns true if ready to deliver a timer interrupt too early
+UINT64 vcpu_timer_pending_early(VCPU *vcpu)
+{
+ UINT64 now = ia64_get_itc();
+ UINT64 itm = PSCB(vcpu,domain_itm);
+
+ if (vcpu_timer_disabled(vcpu)) return 0;
+ if (!itm) return 0;
+ return (vcpu_deliverable_timer(vcpu) && (now < itm));
+}
+
//FIXME: This is a hack because everything dies if a timer tick is lost
void vcpu_poke_timer(VCPU *vcpu)
{
if (irr & (1L<<(0xef-0xc0))) return;
if (now-itm>0x800000)
printf("*** poking timer: now=%lx,vitm=%lx,xitm=%lx,itm=%lx\n",now,itm,local_cpu_data->itm_next,ia64_get_itm());
- vcpu_pend_interrupt(vcpu, 0xefL);
+ vcpu_pend_timer(vcpu);
}
}
}
//if (!is_idle_task(next->domain) )
//send_guest_virq(next, VIRQ_TIMER);
load_region_regs(current);
+ if (vcpu_timer_expired(current)) vcpu_pend_timer(current);
}
void panic_domain(struct pt_regs *regs, const char *fmt, ...)
printf(buf);
if (regs) show_registers(regs);
domain_pause_by_systemcontroller(current->domain);
+ set_bit(DF_CRASHED, ed->domain->d_flags);
//while(test);
}
// control flags for turning on/off features under test
#undef CLONE_DOMAIN0
-//#define CLONE_DOMAIN0 3
-#define USER_ACCESS
+//#define CLONE_DOMAIN0 1
// manufactured from component pieces